//
//  TEST.swift
//  casdon_swiftUI
//
//  Created by ww on 2025/5/16.
//

import SwiftUI

struct TestView: View {

    
    @StateObject var permissionManager = PermissionManager.shared

    var body: some View {
        VStack {
            Text("网络是否可用：\(permissionManager.isNetworkReachable ? "✅" : "❌")")
           
            Text("当前网络类型：\(permissionManager.currentNetworkType.rawValue)")
            
            if permissionManager.currentNetworkType == .wifi {
                Text("WiFi名称：\(permissionManager.getWiFiSSID() ?? "未知")")
            }
            
            Text("蓝牙授权：\(permissionManager.bluetoothStatus.rawValue)")
            Text("定位权限：\(permissionManager.locationStatus.rawValue)")
            Text("局域网权限：\(permissionManager.isLocalNetworkAuthorized ? "✅" : "❌")")
            
            Button("跳转到设置") {
                permissionManager.openAppSettings()
            }.padding()
        }
    }

}

